package com.tao.design.strategy.demo2;

import com.tao.design.strategy.Order;
import org.springframework.stereotype.Component;

/**
 * 银行卡支付
 */
@Component
public class BankCardPayment implements Payment {

    @Override
    public PaymentEnum getPayType() {
        return PaymentEnum.Bank_Card;
    }

    @Override
    public PayResult pay(Order2 order) {
//        调用银行卡支付
        if (1 > 0) {
            return PayResult.SUCCESS;
        } else {
            return PayResult.FAIL;
        }
    }

}
